package com.example.coursedesign;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.example.coursedesign.R;

public class addRemind extends AppCompatActivity {
    @Override
    protected void onCreate( Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_add_remind);
    }
//
//    //    @Override
////    protected void onCreate(@Nullable Bundle savedInstanceState) {
////        super.onCreate(savedInstanceState);
////        setContentView(R.layout.activity_add_remind);
//
////        EditText editTextDrugName = findViewById(R.id.editText_drugName);
////        Button buttonAddDrugImage = findViewById(R.id.button_addDrugImage);
////        EditText editTextRequiredDosage = findViewById(R.id.editText_requiredDosage);
////        EditText editTextTimeToTake = findViewById(R.id.editText_timeToTake);
////        EditText editTextCurrentDosage = findViewById(R.id.editText_currentDosage);
////        EditText editTextReminderTime = findViewById(R.id.editText_reminderTime);
////        EditText editTextNotes = findViewById(R.id.editText_notes);
////        Button buttonSave = findViewById(R.id.button_save);
////
////        // 设置点击事件监听器
////        buttonSave.setOnClickListener(new View.OnClickListener() {
////            @Override
////            public void onClick(View v) {
////                String drugName = editTextDrugName.getText().toString();
////                double requiredDosage = Double.parseDouble(editTextRequiredDosage.getText().toString());
////                String timeToTake = editTextTimeToTake.getText().toString();
////                double currentDosage = Double.parseDouble(editTextCurrentDosage.getText().toString());
////                double reminderTime = Double.parseDouble(editTextReminderTime.getText().toString());
////                String notes = editTextNotes.getText().toString();
////
////                // 在这里处理数据并保存到数据库或执行其他操作
////                // 例如：
////                // saveData(drugName, requiredDosage, timeToTake, currentDosage, reminderTime, notes);
////
////                // 清空输入框
////                editTextDrugName.setText("");
////                editTextRequiredDosage.setText("0");
////                editTextTimeToTake.setText("00:00");
////                editTextCurrentDosage.setText("0");
////                editTextReminderTime.setText("0");
////                editTextNotes.setText("");
////            }
////        });
////    }
}